package com.arch.dev.server.bean;

import javax.persistence.Column;

import javax.persistence.Entity;

import javax.persistence.GeneratedValue;

import javax.persistence.Id;

import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "catagory")
public class Catagory extends AbstractTimestampEntity{

	private Long id;

	private String name;

	public Catagory() {

	}

	public Catagory(String name) {

		this.name = name;

	}

	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	@Column(name = "CATAGORY_ID")
	public Long getId() {

		return id;

	}

	@Column(name = "CATAGORY_NAME")
	public String getName() {

		return name;

	}

	public void setId(Long id) {

		this.id = id;

	}

	public void setName(String name) {

		this.name = name;

	}

	@Override
	public String toString() {

		return new String("Id :" + id + "Description : " + name);

	}

}
